package cloudEntity.enumation;

import lombok.Getter;

/**
 * @program: Smart School
 * @ClassName UserStatusEnum
 * @description:
 * @author: 陈智博
 * @create: 2025-05-15 15:45
 * @Version 1.0
 **/
@Getter
public enum UserDutyEnum {

    ADMIN("管理员",1),
    TEACHER("普通教师",2),
    STUDENT("学生",3),
    DEFAULT("无",4);

    private final String sysUserName;
    private final Integer sysUserNameType;

    UserDutyEnum(String sysUserName, Integer sysUserNameType) {
        this.sysUserName = sysUserName;
        this.sysUserNameType = sysUserNameType;
    }

    public static String getDescriptionByValue(Integer value) {
        for (UserDutyEnum status : UserDutyEnum.values()) {
            if (status.getSysUserNameType().equals(value)) {
                return status.getSysUserName();
            }
        }
        return null; // 或者抛出异常，根据需求而定
    }

}
